package com.hr.system.service.impl;

import java.util.List;

import com.hr.common.core.domain.entity.SysUser;
import com.hr.common.core.domain.vo.SysUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hr.system.mapper.WorkExperienceMapper;
import com.hr.system.domain.WorkExperience;
import com.hr.system.service.IWorkExperienceService;
import com.hr.common.core.text.Convert;

/**
 * 任职经历Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-02-23
 */
@Service
public class WorkExperienceServiceImpl implements IWorkExperienceService 
{
    @Autowired
    private WorkExperienceMapper workExperienceMapper;

    /**
     * 查询任职经历
     * 
     * @param id 任职经历ID
     * @return 任职经历
     */
    @Override
    public WorkExperience selectWorkExperienceById(Long id)
    {
        return workExperienceMapper.selectWorkExperienceById(id);
    }

    /**
     * 根据用户查询任职数据
     * @param user
     * @return
     */
    @Override
    public WorkExperience selectWorkExperienceByUserTenantId(SysUser user) {
        return workExperienceMapper.selectWorkExperienceByUser(user);
    }

    /**
     * 查询任职经历列表
     * 
     * @param workExperience 任职经历
     * @return 任职经历
     */
    @Override
    public List<WorkExperience> selectWorkExperienceList(WorkExperience workExperience)
    {
        return workExperienceMapper.selectWorkExperienceList(workExperience);
    }

    /**
     * 新增任职经历
     * 
     * @param workExperience 任职经历
     * @return 结果
     */
    @Override
    public int insertWorkExperience(WorkExperience workExperience)
    {
        return workExperienceMapper.insertWorkExperience(workExperience);
    }

    /**
     * 修改任职经历
     * 
     * @param workExperience 任职经历
     * @return 结果
     */
    @Override
    public int updateWorkExperience(WorkExperience workExperience)
    {
        return workExperienceMapper.updateWorkExperience(workExperience);
    }

    /**
     * 删除任职经历对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWorkExperienceByIds(String ids)
    {
        return workExperienceMapper.deleteWorkExperienceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除任职经历信息
     * 
     * @param id 任职经历ID
     * @return 结果
     */
    @Override
    public int deleteWorkExperienceById(Long id)
    {
        return workExperienceMapper.deleteWorkExperienceById(id);
    }
}
